<template>
  <div class="item">
    <ul-button type="primary" @click="back">back</ul-button>
    <ul-button type="primary" @click="history">history</ul-button>
    <h1>This is an item page</h1>
     <div class="index-footer-wrapper" style="background-color: #2e323e;padding:30px;color: rgba(255,255,255,0.5);text-align:center;">
      <div style="">
        <div class="" style="font-size:26px;margin-bottom:18px;">河南省高等学校课程学习平台</div>
        <div style="margin:8px 0">
          <span style="margin:0 10px">@2022 河南省高等学校课程学习平台 版权所有</span>
          <span style="margin:0 10px">网站运维：河南省高等学校课程管理服务中心</span>
        </div>
      </div>
    </div>
    <div class="index-footer-wrapper" style="background-color: #2e323e;padding:30px;color: rgba(255,255,255,0.5);display:none;">
      <div style="">
        <div class="" style="font-size:32px;margin-bottom:18px;">河南省高等学校课程学习平台</div>
        <div style="margin:8px 0">
          <span style="margin:0 10px">@2022 河南省高等学校课程学习平台 版权所有</span>
          <span style="margin:0 10px">网站运维：河南省高等学校课程管理服务中心</span>
          <!-- <a style="margin:0 10px;color: rgba(255,255,255,0.5);text-decoration: none;" target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=11010202007783"><img style="margin:0 10px -3px 0" src="https://courseweb.tongshike.cn/common/img/police_record.png"><span>京公网安备 11010202007783号</span></a> -->
        </div>
      </div>
      <!-- <div style="margin:8px 0">
        <a target="_blank" href=""  style="margin:0 10px;color: rgba(255,255,255,0.5);text-decoration: none;">联系我们</a>
        <a target="_blank" href=""  style="margin:0 10px;color: rgba(255,255,255,0.5);text-decoration: none;">关于网站</a>
        <a target="_blank" href=""  style="margin:0 10px;color: rgba(255,255,255,0.5);text-decoration: none;">隐私政策</a>
        <a target="_blank" href=""  style="margin:0 10px;color: rgba(255,255,255,0.5);text-decoration: none;">知识产权生命</a>
      </div>
      <div>
        <span>网站运维：高等教育出版社</span>
      </div> -->
    </div>
     <el-table
      :data="data"
      stripe
      border
      style="width: 100%">
      <el-table-column
        prop="name"
        label="模块"
        width="180">
      </el-table-column>
      <el-table-column
        prop="oriSize"
        label="文件大小（前）"
        width="140">
        <template slot-scope="scope">
         <span>{{scope.row.oriSize | toMb}}</span>
        </template>
      </el-table-column>
      <el-table-column
        prop="newSize"
        label="文件大小（后）"
        width="140">
        <template slot-scope="scope">
         <span>{{scope.row.newSize | toMb}}</span>
        </template>
      </el-table-column>
      <el-table-column
        prop="newSize"
        label="删减大小"
        width="140">
        <template slot-scope="scope">
         <span class="red">{{(scope.row.newSize === '' ? 0 : scope.row.oriSize - scope.row.newSize) | toMb}}</span>
        </template>
      </el-table-column>
      <el-table-column
        prop="oriFolders"
        label="文件夹个数（前）"
        width="140">
      </el-table-column>
      <el-table-column
        prop="newFolders"
        label="文件夹个数（后）"
        width="140">
      </el-table-column>
      <el-table-column
        prop="oriFiles"
        label="文件个数（前）"
        width="140">
      </el-table-column>
      <el-table-column
        prop="newFiles"
        label="文件个数（后）"
        width="140">
      </el-table-column>
      <el-table-column
        prop="desc"
        label="备注">
      </el-table-column>
    </el-table>
  </div>
</template>
<script>
import History from '../router/history.js'
export default {
  name: 'page-item',
  data () {
    return {
       data:[
        {
          name: 'www',
          oriSize: 701374752,
          newSize: 514389604,
          oriFolders: 3549,
          newFolders: 1867,
          oriFiles: 16585,
          newFiles:12940,
          desc: 'course_web全部代码文件'
        },
        {
          name: 'admin',
          oriSize: 5594025,
          newSize: 2162189,
          oriFolders: 93,
          newFolders: 70,
          oriFiles: 298,
          newFiles:194,
          desc: '管理员'
        },
        {
          name: 'ulearning',
          oriSize: 16411064,
          newSize: '',
          oriFolders: 165,
          newFolders: '',
          oriFiles: 876,
          newFiles:'',
          desc: 'course_web'
        },
        {
          name: 'common',
          oriSize: 141705293,
          newSize: '',
          oriFolders: 575,
          newFolders: '',
          oriFiles: 4942,
          newFiles:'',
          desc: '公用静态资源'
        },
        {
          name: 'common/img',
          oriSize: 39415067,
          newSize: '',
          oriFolders: 28,
          newFolders: '',
          oriFiles: 627,
          newFiles:'',
          desc: '公共图片'
        },
        {
          name: 'common/vendor',
          oriSize: 96885751,
          newSize: 91700486,
          oriFolders: 521,
          newFolders: 498,
          oriFiles: 4105,
          newFiles: 3875,
          desc: '三方库'
        },
        {
          name: 'content-detection',
          oriSize: 39994279,
          newSize: 14894022,
          oriFolders: 1402,
          newFolders: 80,
          oriFiles: 80,
          newFiles: 533,
          desc: '内容审核，vue项目,可独立部署'
        },
        {
          name: 'kcsz(portalSiteTemp)',
          oriSize: 49929280,
          newSize: '',
          oriFolders: 23,
          newFolders: '',
          oriFiles: 426,
          newFiles: '',
          desc: '课程思政门户，门户组件抽取，便于开发，vue项目，可独立部署'
        },
        {
          name: 'league',
          oriSize: 15101603,
          newSize: '',
          oriFolders: 17,
          newFolders: '',
          oriFiles: 137,
          newFiles: '',
          desc: '天津海教园联盟，vue项目，可独立部署'
        },
        {
          name: 'publicCourse',
          oriSize: 16943369,
          newSize: '',
          oriFolders: 37,
          newFolders: '',
          oriFiles: 258,
          newFiles: '',
          desc: '人民网公开课'
        },
        {
          name: 'fjsd',
          oriSize: 18041124,
          newSize: 0,
          oriFolders: 6,
          newFolders: 0,
          oriFiles: 161,
          newFiles: 0,
          desc: '福建师大门户，vue项目，可独立部署，已合并到szmy内删除目录'
        },
        {
          name: 'gdgcLeague',
          oriSize: 3536508,
          newSize: '',
          oriFolders: 16,
          newFolders: '',
          oriFiles: 96,
          newFiles: '',
          desc: '人民数字马院思政，knouckout，90%为图片文件'
        },
        {
          name: 'hnszCourseLeague',
          oriSize: 7238908,
          newSize: '',
          oriFolders: 15,
          newFolders: '',
          oriFiles: 98,
          newFiles: '',
          desc: '湖南高职思政联盟，knockout，90%为图片文件'
        },
        {
          name: 'monitor',
          oriSize: 7722925,
          newSize: 0,
          oriFolders: 15,
          newFolders: 0,
          oriFiles: 88,
          newFiles: 0,
          desc: '姿态检测，90%为第三方文件，demo页面，删除'
        },
        {
          name: 'organization',
          oriSize: 7000305,
          newSize: '',
          oriFolders: 28,
          newFolders: '',
          oriFiles: 212,
          newFiles: '',
          desc: '二级门户，knouckout,主要是图片文件'
        },
        {
          name: 'portal',
          oriSize: 6778708,
          newSize: '',
          oriFolders: 43,
          newFolders: '',
          oriFiles: 245,
          newFiles: '',
          desc: '优学院门户，knouckout'
        },
        {
          name: 'portal-site',
          oriSize: 6778708,
          newSize: '',
          oriFolders: 43,
          newFolders: '',
          oriFiles: 245,
          newFiles: '',
          desc: '老版门户，主要是图片文件，60%为图片文件'
        },
        {
          name: 'record',
          oriSize: 15984265,
          newSize: 3077562,
          oriFolders: 20,
          newFolders: 20,
          oriFiles: 63,
          newFiles: 55,
          desc: '课堂录播，vue项目，可独立部署'
        },
        {
          name: 'right-ms',
          oriSize: 23208415,
          newSize: 10121376,
          oriFolders: 130,
          newFolders: '',
          oriFiles: 237,
          newFiles: '',
          desc: '权限管理系统，vue项目，可独立部署'
        },
        {
          name: 'sc',
          oriSize: 2302715,
          newSize: '',
          oriFolders: 19,
          newFolders: '',
          oriFiles: 102,
          newFiles: '',
          desc: '人民双创，knouckout，80%图片'
        },
        {
          name: 'screen',
          oriSize: 24650085,
          newSize: '',
          oriFolders: 41,
          newFolders: '',
          oriFiles: 157,
          newFiles: '',
          desc: '投屏，vue项目，可独立部署，map文件过大'
        },
        {
          name: 'sj',
          oriSize: 31927119,
          newSize: '',
          oriFolders: 56,
          newFolders: '',
          oriFiles: 263,
          newFiles: '',
          desc: '时间教学，vue项目，内部index目录是knouckout门户，可以去除map文件'
        },
        {
          name: 'sjjx',
          oriSize: 42219376,
          newSize: '',
          oriFolders: 300,
          newFolders: '',
          oriFiles: 2560,
          newFiles: '',
          desc: '实践教学网站管理和预览，angular项目，主要为图片和三方库文件'
        },
        {
          name: 'smart-classroom',
          oriSize: 23208415,
          newSize: 15450,
          oriFolders: 130,
          newFolders: 0,
          oriFiles: 265,
          newFiles: 5,
          desc: '智慧课堂,只有重定向功能，业务代码在独立的项目内'
        },
        {
          name: 'szmy',
          oriSize: 21204875,
          newSize: '',
          oriFolders: 6,
          newFolders: '',
          oriFiles: 273,
          newFiles: '',
          desc: '最新版的门户，后台配置菜单，这边门户端显示'
        },
        {
          name: 'zyk',
          oriSize: 20804090,
          newSize: '',
          oriFolders: 128,
          newFolders: '',
          oriFiles: 500,
          newFiles: '',
          desc: '资源库'
        },
        {
          name: 'export',
          oriSize: 67017226,
          newSize: '',
          oriFolders: 1660,
          newFolders: '',
          oriFiles: 3377,
          newFiles: '',
          desc: '试卷导出word，主要是三方库文件，公式库58mb'
        }
      ]
    }
  },
  methods: {
    history () {
      console.log(this)
    },
    back () {
      this.$router.goBack()
    }
  },
  filters: {
    toMb (input) {
      if (input === '') {
        return '--'
      }
      return ((input/1024/1024)).toFixed(1) + 'Mb'
    }
  }
}
</script>
<style lang="scss">
.red{
  color: #ea5947;
  
}
</style>
